/**
 * All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
 *
 * PmContractActionAuto
 * 项目合同
 *
 * 修改纪录
 * 2020-05-18 版本：1.0 wushenghong 创建。
 * @version 版本：1.0
 * @author 作者：wushenghong
 * 创建日期：2020-05-18
 */

package com.topscomm.pm.controller.auto;

import com.topscomm.pm.PmController;
import com.topscomm.pm.pojo.PmContractEntity;
import com.topscomm.pm.service.IPmContractService;
import com.topscomm.pub.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PmContractControllerAuto extends PmController<PmContractEntity, IPmContractService> {
	/**
	 *
	 * @description:
	 * @param paraMap
	 * @return
	 * @author: wushenghong
	 * @date: 2020-05-18
	 * @modify:
	 */
	@Override
	@GetMapping(value = "/dataCodeList")
	public ResponseResult<Object> dataCodeList(@RequestParam(required = false) Map<String, Object> paraMap) {
		Map<String, Object> codeMap = new HashMap<String, Object>();
		List<Map<String, Object>> courierList = datacodeCache.getCodeListMap("PmCourier", "", "sortcode");
		codeMap.put("courierList", courierList);
//		List<Map<String, Object>> flowidList = flowDatacodeCache.getApprovalFlowListMap("ApprovalFlow_PmContract", this.getUserBean(), "sortcode");
//		codeMap.put("flowidList", flowidList);
		List<Map<String, Object>> stateList = datacodeCache.getCodeListMap("TapApprovalBillState", "", "sortcode");
		codeMap.put("stateList", stateList);
		List<Map<String, Object>> paytypeList = datacodeCache.getCodeListMap("PmContractPayType", "", "sortcode");
		codeMap.put("paytypeList", paytypeList);
		List<Map<String, Object>> enabledList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
		codeMap.put("enabledList", enabledList);
		List<Map<String, Object>> approvalDepartmentList = datacodeCache.getCodeListMap("ApprovalDepartment", "", "sortcode");
		codeMap.put("approvalDepartmentList", approvalDepartmentList);
		super.dataCodeList(paraMap);
		return ResponseResult.ok(codeMap);
	}
}

